﻿set(PROJECT_NAME_O txr_algo_dlm_seg_v2_o)
project(${PROJECT_NAME_O} LANGUAGES CXX)

add_definitions(-DTXR_ALGO_DLM_SEGMENT_V2_O_LIB)

# Set compiler options for MSVC to use UTF-8 encoding
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

include_directories(
	${BOOST_INCLUDEDIR}
	${MY_CRYPTOPP_INCLUDE_DIR}
	${MY_OPENCV_INCLUDE_DIR}
    ${MY_OPENVINO_INCLUDE_DIR}
)
link_directories(
	${Boost_LIBRARY_DIRS}
	${MY_CRYPTOPP_LIB_DIR}
	${MY_OPENCV_LIBS_DIR}
    ${MY_OPENVINO_LIB_DIR}
)

set(ALGO_DLM_SEGMENT_V2_O_LIBS 
	Qt5::Core
	Qt5::Gui
	dxgi 
	${MY_OPENCV_LIBS}
	${MY_CRYPTOPP_LIB}
    ${MY_OPENVINO_LIBS}
)
file(GLOB_RECURSE CURRENT_HEADERS  *.h *.hpp)
file(GLOB_RECURSE CURRENT_SOURCES  *.c *.cpp)
source_group("Include" FILES ${CURRENT_HEADERS}) 
source_group("Source" FILES ${CURRENT_SOURCES})

add_library(${PROJECT_NAME_O} SHARED
	${CURRENT_HEADERS} 
	${CURRENT_SOURCES} 
)

target_link_libraries(${PROJECT_NAME_O} PRIVATE ${ALGO_DLM_SEGMENT_V2_O_LIBS})

install(TARGETS ${PROJECT_NAME_O} DESTINATION 
        RUNTIME DESTINATION bin
        ARCHIVE DESTINATION lib
        LIBRARY DESTINATION lib
)